package com.gs.SynAntiWandering.util;

import android.widget.Toast;

public class ToastUtil {
    private static Toast toast = null;

    public static void showToast(String message) {
        if (toast != null) {
            toast.cancel();
        }
        toast = Toast.makeText(AppUtil.getInstance().getContext(), message, Toast.LENGTH_SHORT);
        toast.show();
    }

    public static void showToast(int message) {
        if (toast != null) {
            toast.cancel();
        }
        toast = Toast.makeText(AppUtil.getInstance().getContext(), message, Toast.LENGTH_SHORT);
        toast.show();
    }
}
